home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
language
/
j_41_st.zoo
/
emacs.bindings
next >
Wrap
Internet Message Format
|
1992-03-17
|
4KB
From pjf@osiris.cs.uoguelph.ca Sat Mar 7 10:42 EST 1992
From: pjf@osiris.cs.uoguelph.ca (Peter Jaspers-Fayer)
Message-Id: <9203071541.AA16593@osiris.cs.uoguelph.ca>
Subject: J 4 on the ST ("emacs-like" keys)
To: ljdickey@watmath (Prof Lee Dickey)
Date: Sat, 7 Mar 92 10:41:54 EST
Organization: Computing & Comm. Services, Univ. of Guelph, Ont. Can. N1G 2W1
Hi. I had a look at the latest ST version of J, and (in case you were still
using your ST), thought I'd forward a few things:
Discovering that ^Q allowed me to explore his key mappinmg a a bit.
Scott Kolodzieski's original README.ST file expanded by PJF Mar'92:
==============================================================================
files : 1. j41-st.tos The executable
2. input.rc A key file that specifies the default key
bindings for the readline interface.
==============================================================================
Notes : The major advantage of this ST port of J is the fact that I built a
gnu-readline interface into the j input parser. Now j41-st.tos keeps
a history of previous commands that may be recalled and changed. Also
while typing in any command, the current line may be edited and
changed anytime before a <return> is pressed. The key bindings are
by default,
^A : beginning of line
^B : backward-character
^D : delete character under cursor (cf <Delete> key)
^E : end-of-line
^F : forward-character
^H : as <Backspace> key
^K : kill-to-end-of-line
^J : execute (like ^M & enter)
^N : next-command
^L : redraw screen with current line at top
^M : execute (like ^J & enter)
^P : previous-command
^Q or ^V quote next character, eg. ^Q^H enters a BS character
^R : reverse search for string in this line (end with <esc>)
^S : forward search for string in this line
^U : kill-to-beginning-of-line
^Y : yank-back-previously-killed-buffer
^Delete : undelete chars deleted on this line.
A more pleasing arrangment would be to have the 4 arrow keys
bound to (^F,^B,^P,^N) in the obvious order. This may be done
by setting the environment variable INPUTRC to point to the
included file "input.rc". An exmaple of this (from my system
on which I run bash) would be :
set INPUTRC="c:\lib\readline\input.rc"
^
|
+-- replace by correct path.
j41-st.tos
Should put you into j41-st with a nice key binding set up.
cheers,
scott kolodzieski
==============================================================================
This allowed me to set the <Undo> and <Help> keys, and so show how one could
also set the F1-F10 keys. I guess you could also remap just about any control
or escape sequence. Here is my (added to) INPUT.RC file:
==============================================================================
# bind <up-arrow>
"\e*H": previous-history
# bind <down-arrow>
"\e*P": next-history
# bind <left-arrow>
"\e*K": backward-char
# bind <right-arrow>
"\e*M": forward-char
# bind <delete> and <back-space>
"": backward-delete-char
"✓": backward-delete-char
#
# Using the ^Q key from within J, I was able to determine the sequences below:
#
# Help key edits a file
"\e*b" "0!:0 'more EXT_CONJ.JS' NB. Edit a list of conjunctions"
# Undo key sets up for )off (Needs a <cr>, unlike unix, can't store one here.)
"\e*a" "0!:55 ')off'"
# F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 send
# \e*; \e*< \e*= \e*> \e*? \e*@ \e*A \e*B \e*C \e*D
"\e*;" "4!:0 3"
"\e*<" "0!:0 'vi "
"\e*>" "2!:4 <'"
--
/PJ pjf@osiris.cs.uoguelph.ca
pjf@vm.uoguelph.ca
(519)824-4120x6309